<?php
	define('CONFIG_FILE',true);
	include '../config.php';
	
	define('DB_FILE',true);
	require_once '../Tool/DB/SqlDBManager.class.php';

	$holidayName = $_Request['HolidayName'];
	$date = $_REQUEST['Date'];
	$day = $_REQUEST['Day'];

	$sql = "INSERT into holiday(HolidayName,Date,Day) values(?,?,?)";
	$parameters = array($holidayName,$date,$day);
    $res=$sqlDBManager->execute_dml($sql,$parameters);
	if ($res>0){
		echo json_encode(array('success'=>true));
	} else {
		echo json_encode(array('msg'=>'Create new holiday failed due to database error.'));
	}
?>